<template>
  <div>
<h2>1111111Vue基本元素--html末班语法（{{}}+指令）</h2>
姓名:<input type="text" v-model="userName"  /><br>
密码:<input type="text" v-model="userPwd" /><br>
<input type="button" value="改变值" @click="login" />
  </div>
</template>

<script setup lang="ts">

import { reactive,toRefs } from 'vue';

let data:any=reactive({
userName:'',
userPwd:''
});
let {userName,userPwd}=toRefs(data)

const login=()=>{
  alert("姓名"+userName.value+"密码"+userPwd.value)
}
123123123
</script>

<style scoped>

</style>